﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SalesController
{
    public abstract class DAOFactory
    {
        public const int MYSQL = 1;
        public const int SQLSERVER = 2;
        public const int XML = 3;

        public static DAOFactory getDAOFactory(int dbType)
        {
            DAOFactory factory = null;
            switch (dbType)
            {
                case MYSQL: factory = new MySQLDAOFactory(); break;
                case SQLSERVER: factory = new SQLServerDAOFactory(); break;
                case XML: factory = new XMLDAOFactory(); break;
            }
            return factory;
        }

        public abstract DAOProduct getDAOProduct();
        public abstract DAOCustomer getDAOCustomer();
        public abstract DAOStore getDAOStore();
        public abstract DAOPriceByDate getDAOPriceByDate();
        public abstract DAOEmployee getDAOEmployee();
        public abstract DAOSale getDAOSales();
        public abstract DAOSaleDetail getDAOSaleDetail();
    }
}
